package com.common.physics
{
	public class Velocity
	{
		
		public var speed : Number;
		public var direction : Number;
		
		public function Velocity(_speed:Number = 0, _direction:Number = 0)
		{
			speed = _speed;
			direction = _direction;
		}
		
		public function getVector() : Vector2 {
			var vector:Vector2 = new Vector2();
			vector.x = Math.cos(direction/180*Math.PI) * speed;
			vector.y = Math.sin(direction/180*Math.PI) * speed;
			return vector
		}

	}
}
